<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #one {
            width: 500px;
            height: 500px;
            background-color: #ccc;
        }
        
        #two {
            width: 300px;
            height: 300px;
            background-color: pink;
        }
        
        #three {
            width: 100px;
            height: 100px;
            background-color: #ff3040;
        }
    </style>
</head>

<body>
    <div id="one">
        <div id="two">
            <div id="three"></div>
        </div>
    </div>
    <script>
        var one = document.getElementById('one')
        var two = document.getElementById('two')
        var three = document.getElementById('three')
            // one.onclick = function() {
            //     console.log(1)
            // }
            // two.onclick = function() {
            //     console.log(2222)
            // }
            // three.onclick = function() {
            //         console.log(333333333333333)
            //     }
        one.addEventListener('click', function() {
            console.log(1)
        }, true)
        two.addEventListener('click', function() {
            console.log(22222)
        }, true)
        three.addEventListener('click', function() {
                console.log(33333333333333)
            }, true)
            // 捕获 当前阶段 冒泡
    </script>
</body>

</html>